<table class="table table-bordered" id="edit-field-manage-table" data-toggle="datagrid" data-options="{
    tableWidth: '100%',
    height: '100%',
    gridTitle : 'app按钮列表',
    showToolbar: true,
    toolbarItem: 'add',
    local: 'local',
    dataUrl: '/admin/appset/work-list',
    linenumberAll: false,
    showLinenumber: false,
    filterThead: false,
    showEditbtnscol: '操作',
    editUrl: '/admin/appset/work-edit?id={id}',
    editCallback:editCallback,
    delUrl:'/admin/appset/work-delete',
    delPK:'id',
    delConfirm: true,
    isTree: 'title',
    treeOptions: {
        expandAll: false,
        add: true,
        simpleData: true,
        keys: {
            parentKey: 'pid',
        }
    }
}">
    <thead>
    <tr>
        <th data-options="{name:'title',align:'center',width:170}">选项标题</th>
        <th data-options="{name:'type',align:'center',width:30}">type</th>
        <th data-options="{name:'is_sale',type:'select',items:[{0:'是'},{1:'否'}],align:'center',width:40}">工厂角色</th>
        <th data-options="{name:'http_img_url',align:'center',render:http_img_url,add:false,edit:false,width:50}">图标</th>
        <th data-options="{name:'img_url',align:'center',width:250}">图标路径</th>
        <th data-options="{name:'http_img_url_active',align:'center',render:http_img_url,add:false,edit:false,width:80}">点击时图标</th>
        <th data-options="{name:'img_url_active',align:'center',width:250}">点击时图标路径</th>
        <th data-options="{name:'is_show_help',type:'select',items:[{0:'否'},{1:'是'}],align:'center',width:40}">显示帮助</th>
        <th data-options="{name:'help_href',align:'center',width:250}">帮助</th>
    </tr>
    </thead>
</table>
<script type="text/javascript">
    function http_img_url(value, data){
        var html = '暂无';
        if( value != '' ){
            html = '<img src="'+value+'" width="30">';
        }
        return html;
    }
</script>